//
//  LcbFrame.h
//  lcb
//
//  Created by lcb on 2017/3/15.
//  Copyright © 2017年 lcb. All rights reserved.
//


#ifndef LcbFrame_h
#define LcbFrame_h
#define ScreenWidthLcb CGRectGetMaxX([UIScreen mainScreen].bounds)
#define ScreenHightLcb CGRectGetMaxY([UIScreen mainScreen].bounds)

#pragma mark 说明:下面二个参数,看公司项目UI图 具体是哪款机型,默认  iphone6
/**
 RealUISrceenH 4/4s 修改480 5/5s 568  6/6s 667  6p/6sp 736
 */
static const float  RealUISrceenHight =  480.0;
/**
 RealUISrceenW  4/4s 5/5s 320  6/6s 375  6p/6sp 414
 */
static const float RealUISrceenWidth = 320.0;

#import "LcbFrameAutoScale.h"
#pragma mark 一系列宏定义,快速设置frame等
/**
 [FrameAutoScaleLcb CGLcbMakeX:20 CGRectGetX:CGRectGetMaxY(detailUI.frame) width:300 height:30]
 如果觉得这样写麻烦,可以使用一下宏定义
 */
#define LcbWIDTH(X_Lcb) ScreenWidthLcb*(X_Lcb)/RealUISrceenWidth
#define LcbHEIGHT(Y_Lcb) ScreenHightLcb*(Y_Lcb)/RealUISrceenHight

#define LcbRectMake(X_Lcb,Y_Lcb,LcbWIDTH,LcbHEIGHT) CGRectMake(ScreenWidthLcb*(X_Lcb)/RealUISrceenWidth,ScreenHightLcb*(Y_Lcb)/RealUISrceenHight,ScreenWidthLcb*(LcbWIDTH)/RealUISrceenWidth, ScreenHightLcb*(LcbHEIGHT)/RealUISrceenHight)

#define LcbEdgeInsets(X_Lcb,Y_Lcb,LcbWIDTH,HEIGHT_Lcb) UIEdgeInsetsMake(ScreenWidthLcb*(X_Lcb)/RealUISrceenWidth,ScreenHightLcb*(Y_Lcb)/RealUISrceenHight,ScreenWidthLcb*(LcbWIDTH)/RealUISrceenWidth, ScreenHightLcb*(LcbHEIGHT)/RealUISrceenHight)

#define LcbPointMake(X_Lcb,Y_Lcb) CGPointMake(ScreenWidthLcb*(X_Lcb)/RealUISrceenWidth, ScreenHightLcb*(Y_Lcb)/RealUISrceenHight)

#define LcbSizeMake(LcbWIDTH,LcbHEIGHT) CGSizeMake(ScreenWidthLcb*(LcbWIDTH)/RealUISrceenWidth, ScreenHightLcb*(LcbHEIGHT)/RealUISrceenHight)

#endif
